package com.punai.dataanalysis.epdatakb.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.punai.common.annotation.Excel;
import com.punai.common.core.domain.BaseEntity;
import com.punai.common.utils.NumberUtil;
import com.punai.dataanalysis.ng001.domain.ProjectTable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 年度工程量盘点情况汇总对象 data_analysis_ndgclpdqkhzb
 *
 * @author zxw_
 * @date 2023-04-20
 */
public class DataAnalysisNdgclpdqkhzb extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;
    /**
     * 序号
     */
    @Excel(name = "序号")
    private String xh;
    /**
     * 项目部
     */
    @Excel(name = "项目部")
    private String deptName;
    /**
     * 合同受控号
     */
    @Excel(name = "合同受控号")
    private String htContrNo;
    /**
     * 建设单位
     */
    @Excel(name = "建设单位")
    private String jsdw;
    /**
     * 项目编码
     */
    @Excel(name = "项目编码")
    private String proCode;
    /**
     * 工程名称
     */
    @Excel(name = "工程名称")
    private String proName;
    /**
     * 合同名称
     */
    @Excel(name = "合同名称")
    private String htName;
    /**
     * 合同价款
     */
    @Excel(name = "合同价款")
    private BigDecimal htTotal;
    /**
     * 工程状态
     */
    @Excel(name = "工程状态")
    private String proStatus;
    /**
     * 本年完成产值-合计
     */
    @Excel(name = "本年完成产值-合计")
    private BigDecimal yearWccz;
    /**
     * 本年完成产值-其中专业分包
     */
    @Excel(name = "本年完成产值-其中专业分包")
    private BigDecimal yearWcczZyfb;
    /**
     * 本年完成产值-税款-一般计税
     */
    @Excel(name = "本年完成产值-税款-一般计税")
    private BigDecimal yearWcczSkYbjs;
    /**
     * 本年完成产值-税款-简易计税
     */
    @Excel(name = "本年完成产值-税款-简易计税")
    private BigDecimal yearWcczSkJyjs;
    /**
     * 本年完成产值-甲供材
     */
    @Excel(name = "本年完成产值-甲供材")
    private BigDecimal yearWcczJgc;
    /**
     * 累计完成产值-开工至节点前
     */
    @Excel(name = "累计完成产值-开工至节点前")
    private BigDecimal ljkgpdz;
    /**
     * 累计完成产值-节点后
     */
    @Excel(name = "累计完成产值-节点后")
    private BigDecimal ljjdhpdz;
    /**
     * 累计完成产值-累计盘点值-合计
     */
    @Excel(name = "累计完成产值-累计盘点值-合计")
    private BigDecimal klpdz;
    /**
     * 累计完成产值-累计盘点值-其中专业分包
     */
    @Excel(name = "累计完成产值-累计盘点值-其中专业分包")
    private BigDecimal klpdzZyfb;
    /**
     * 累计完成产值-税款-一般计税
     */
    @Excel(name = "累计完成产值-税款-一般计税")
    private BigDecimal klWcczSkYbjs;
    /**
     * 累计完成产值-税款-简易计税
     */
    @Excel(name = "累计完成产值-税款-简易计税")
    private BigDecimal klWcczSkJyjs;
    /**
     * 累计完成产值-甲供材
     */
    @Excel(name = "累计完成产值-甲供材")
    private BigDecimal klWcczJgc;
    /**
     * 本年以前会计确认收入-节点前
     */
    @Excel(name = "本年以前会计确认收入-节点前")
    private BigDecimal jdBeforeKjQrsr;
    /**
     * 本年以前会计确认收入-节点后
     */
    @Excel(name = "本年以前会计确认收入-节点后")
    private BigDecimal jdAfterKjQrsr;
    /**
     * 本年以前会计确认收入-本年以前累计确认收入
     */
    @Excel(name = "本年以前会计确认收入-本年以前累计确认收入")
    private BigDecimal yearBeforeLjQrsr;
    /**
     * 本年会计确认收入
     */
    @Excel(name = "本年会计确认收入")
    private BigDecimal bnkjqrsr;
    /**
     * 剩余工程量/总预算-已完成产值
     */
    @Excel(name = "剩余工程量/总预算-已完成产值")
    private BigDecimal sygcl;
    /**
     * 形象进度
     */
    @Excel(name = "形象进度")
    private String xxjd;
    /**
     * 盘点建筑面积m2/完成产值的建筑面积
     */
    @Excel(name = "盘点建筑面积m2/完成产值的建筑面积")
    private String pdjzmj;
    /**
     * 盘点值平方造价/元/平方
     */
    @Excel(name = "盘点值平方造价/元/平方")
    private String pdpmzj;
    /**
     * 省
     */
    @Excel(name = "省")
    private String province;
    /**
     * 市
     */
    @Excel(name = "市")
    private String city;
    /**
     * 区/县
     */
    @Excel(name = "区/县")
    private String county;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    @TableField(exist = false)
    private String xmb;

    @TableField(exist = false)
    private String pc;
    @TableField(exist = false)
    private List<DataAnalysisNdgclpdqkhzb> children = new ArrayList<>();
    /**
     * 合并行
     */
    @TableField(exist = false)
    private boolean hb = false;
    public void hb() {
        this.hb = true;
    }

    public boolean isHb() {
        return hb;
    }

    public void setHb(boolean hb) {
        this.hb = hb;
    }

    public static DataAnalysisNdgclpdqkhzb conversion(DataAnalysisNdgclpdqkhzb dataAnalysisNdgclpdqkhzb, ProjectTable projectTable) {
        if(dataAnalysisNdgclpdqkhzb == null) {
            dataAnalysisNdgclpdqkhzb = new DataAnalysisNdgclpdqkhzb();
        }
        if (projectTable == null) {
            projectTable = new ProjectTable();
        }
        dataAnalysisNdgclpdqkhzb.setDeptName(projectTable.getOname());
        dataAnalysisNdgclpdqkhzb.setHtContrNo(projectTable.getUserSkh());
        dataAnalysisNdgclpdqkhzb.setJsdw(projectTable.getCompname());
        dataAnalysisNdgclpdqkhzb.setProCode(projectTable.getBillNo());
        dataAnalysisNdgclpdqkhzb.setProName(projectTable.getProjectName());
        dataAnalysisNdgclpdqkhzb.setHtName(projectTable.getProjectNamep());
        dataAnalysisNdgclpdqkhzb.setHtTotal(NumberUtil.getValue(projectTable.getCntAmtFc()));
        dataAnalysisNdgclpdqkhzb.setProStatus(projectTable.getDescript());
        dataAnalysisNdgclpdqkhzb.setProvince(projectTable.getProvincename());
        dataAnalysisNdgclpdqkhzb.setCity(projectTable.getCityname());
        dataAnalysisNdgclpdqkhzb.setCounty(projectTable.getRegionname());
        dataAnalysisNdgclpdqkhzb.setXmb(projectTable.getOname());
        return dataAnalysisNdgclpdqkhzb;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setXh(String xh) {
        this.xh = xh;
    }

    public String getXh() {
        return xh;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setHtContrNo(String htContrNo) {
        this.htContrNo = htContrNo;
    }

    public String getHtContrNo() {
        return htContrNo;
    }

    public void setJsdw(String jsdw) {
        this.jsdw = jsdw;
    }

    public String getJsdw() {
        return jsdw;
    }

    public void setProCode(String proCode) {
        this.proCode = proCode;
    }

    public String getProCode() {
        return proCode;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public String getProName() {
        return proName;
    }

    public void setHtName(String htName) {
        this.htName = htName;
    }

    public String getHtName() {
        return htName;
    }

    public void setHtTotal(BigDecimal htTotal) {
        this.htTotal = htTotal;
    }

    public BigDecimal getHtTotal() {
        return htTotal;
    }

    public void setProStatus(String proStatus) {
        this.proStatus = proStatus;
    }

    public String getProStatus() {
        return proStatus;
    }

    public void setYearWccz(BigDecimal yearWccz) {
        this.yearWccz = yearWccz;
    }

    public BigDecimal getYearWccz() {
        return yearWccz;
    }

    public void setYearWcczZyfb(BigDecimal yearWcczZyfb) {
        this.yearWcczZyfb = yearWcczZyfb;
    }

    public BigDecimal getYearWcczZyfb() {
        return yearWcczZyfb;
    }

    public void setYearWcczSkYbjs(BigDecimal yearWcczSkYbjs) {
        this.yearWcczSkYbjs = yearWcczSkYbjs;
    }

    public BigDecimal getYearWcczSkYbjs() {
        return yearWcczSkYbjs;
    }

    public void setYearWcczSkJyjs(BigDecimal yearWcczSkJyjs) {
        this.yearWcczSkJyjs = yearWcczSkJyjs;
    }

    public BigDecimal getYearWcczSkJyjs() {
        return yearWcczSkJyjs;
    }

    public void setYearWcczJgc(BigDecimal yearWcczJgc) {
        this.yearWcczJgc = yearWcczJgc;
    }

    public BigDecimal getYearWcczJgc() {
        return yearWcczJgc;
    }

    public void setLjkgpdz(BigDecimal ljkgpdz) {
        this.ljkgpdz = ljkgpdz;
    }

    public BigDecimal getLjkgpdz() {
        return ljkgpdz;
    }

    public void setLjjdhpdz(BigDecimal ljjdhpdz) {
        this.ljjdhpdz = ljjdhpdz;
    }

    public BigDecimal getLjjdhpdz() {
        return ljjdhpdz;
    }

    public void setKlpdz(BigDecimal klpdz) {
        this.klpdz = klpdz;
    }

    public BigDecimal getKlpdz() {
        return klpdz;
    }

    public void setKlpdzZyfb(BigDecimal klpdzZyfb) {
        this.klpdzZyfb = klpdzZyfb;
    }

    public BigDecimal getKlpdzZyfb() {
        return klpdzZyfb;
    }

    public void setKlWcczSkYbjs(BigDecimal klWcczSkYbjs) {
        this.klWcczSkYbjs = klWcczSkYbjs;
    }

    public BigDecimal getKlWcczSkYbjs() {
        return klWcczSkYbjs;
    }

    public void setKlWcczSkJyjs(BigDecimal klWcczSkJyjs) {
        this.klWcczSkJyjs = klWcczSkJyjs;
    }

    public BigDecimal getKlWcczSkJyjs() {
        return klWcczSkJyjs;
    }

    public void setKlWcczJgc(BigDecimal klWcczJgc) {
        this.klWcczJgc = klWcczJgc;
    }

    public BigDecimal getKlWcczJgc() {
        return klWcczJgc;
    }

    public void setJdBeforeKjQrsr(BigDecimal jdBeforeKjQrsr) {
        this.jdBeforeKjQrsr = jdBeforeKjQrsr;
    }

    public BigDecimal getJdBeforeKjQrsr() {
        return jdBeforeKjQrsr;
    }

    public void setJdAfterKjQrsr(BigDecimal jdAfterKjQrsr) {
        this.jdAfterKjQrsr = jdAfterKjQrsr;
    }

    public BigDecimal getJdAfterKjQrsr() {
        return jdAfterKjQrsr;
    }

    public void setYearBeforeLjQrsr(BigDecimal yearBeforeLjQrsr) {
        this.yearBeforeLjQrsr = yearBeforeLjQrsr;
    }

    public BigDecimal getYearBeforeLjQrsr() {
        return yearBeforeLjQrsr;
    }

    public void setBnkjqrsr(BigDecimal bnkjqrsr) {
        this.bnkjqrsr = bnkjqrsr;
    }

    public BigDecimal getBnkjqrsr() {
        return bnkjqrsr;
    }

    public void setSygcl(BigDecimal sygcl) {
        this.sygcl = sygcl;
    }

    public BigDecimal getSygcl() {
        return sygcl;
    }

    public void setXxjd(String xxjd) {
        this.xxjd = xxjd;
    }

    public String getXxjd() {
        return xxjd;
    }

    public void setPdjzmj(String pdjzmj) {
        this.pdjzmj = pdjzmj;
    }

    public String getPdjzmj() {
        return pdjzmj;
    }

    public void setPdpmzj(String pdpmzj) {
        this.pdpmzj = pdpmzj;
    }

    public String getPdpmzj() {
        return pdpmzj;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getProvince() {
        return province;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCity() {
        return city;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getCounty() {
        return county;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }

    public List<DataAnalysisNdgclpdqkhzb> getChildren() {
        return children;
    }

    public void setChildren(List<DataAnalysisNdgclpdqkhzb> children) {
        this.children = children;
    }

    public String getXmb() {
        return xmb;
    }

    public void setXmb(String xmb) {
        this.xmb = xmb;
    }

    public String getPc() {
        return pc;
    }

    public void setPc(String pc) {
        this.pc = pc;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("xh", getXh())
                .append("deptName", getDeptName())
                .append("htContrNo", getHtContrNo())
                .append("jsdw", getJsdw())
                .append("proCode", getProCode())
                .append("proName", getProName())
                .append("htName", getHtName())
                .append("htTotal", getHtTotal())
                .append("proStatus", getProStatus())
                .append("yearWccz", getYearWccz())
                .append("yearWcczZyfb", getYearWcczZyfb())
                .append("yearWcczSkYbjs", getYearWcczSkYbjs())
                .append("yearWcczSkJyjs", getYearWcczSkJyjs())
                .append("yearWcczJgc", getYearWcczJgc())
                .append("ljkgpdz", getLjkgpdz())
                .append("ljjdhpdz", getLjjdhpdz())
                .append("klpdz", getKlpdz())
                .append("klpdzZyfb", getKlpdzZyfb())
                .append("klWcczSkYbjs", getKlWcczSkYbjs())
                .append("klWcczSkJyjs", getKlWcczSkJyjs())
                .append("klWcczJgc", getKlWcczJgc())
                .append("jdBeforeKjQrsr", getJdBeforeKjQrsr())
                .append("jdAfterKjQrsr", getJdAfterKjQrsr())
                .append("yearBeforeLjQrsr", getYearBeforeLjQrsr())
                .append("bnkjqrsr", getBnkjqrsr())
                .append("sygcl", getSygcl())
                .append("xxjd", getXxjd())
                .append("pdjzmj", getPdjzmj())
                .append("pdpmzj", getPdpmzj())
                .append("province", getProvince())
                .append("city", getCity())
                .append("county", getCounty())
                .append("remark", getRemark())
                .toString();
    }
}
